package I_A.IMS.EUQ.recoder;

import java.awt.Color;


import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Panel;


import java.awt.geom.Line2D;
import java.awt.geom.Line2D.Double;


import java.util.Vector;
/*
 * 个人著作权人, 作者 罗瑶光, 浏阳
 * yaoguangluo@outlook.com, 313699483@qq.com, 2080315360@qq.com,
 * (lyg.tin@gmail.com2018年回国后因国内G网屏蔽不再使用）
 * 15116110525-浏阳德塔软件开发有限公司-创始人-法人-总经理-永久非盈利-
 * 430181198505250014, G24402609, EB0581342
 * 204925063, 389418686, F2406501, 0626136
 * 湖南省 浏阳市 集里街道 神仙坳社区 大塘冲一段路 208号 阳光家园别墅小区 第十栋别墅 第三层
 * */

public class Jpv extends Panel implements Runnable {

    public Vector<Double> lines;
    

    @SuppressWarnings("unused")
    public void paint(Graphics g) {

        Dimension d = this.getSize();
        int w = 1600;
        int h = 600;
        // //20230106-S_logger.Log.logger.info("" + d.width+"**"+d.height);
        int INFOPAD = 15;
        //Graphics g= getGraphics();
        Graphics2D g2 = (Graphics2D) g;
        g2.setBackground(Color.white);
        g2.clearRect(0, 0, w, h);
        g2.setColor(Color.white);
        g2.fillRect(0, h - INFOPAD, w, INFOPAD);
        if (lines != null) {
            // .. render sampling graph ..
            g2.setColor(Color.black);

            for (int i = 1, j = 1; i < lines.size() - 1; i++, j++) {
                Line2D v = (Line2D) lines.get(i);
                Line2D v1 = (Line2D) lines.get(i + 1);
                g2.drawLine(j, (int) v.getY1() + 300, j + 1, (int) v1.getY2() + 300);
            }
        }
    }

    @Override
    public void run() {
    }
}
